import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/booking',
    method: 'post',
    data
  })
}

export function edit (data) {
  return request({
    url: 'api/booking',
    method: 'put',
    data
  })
}

export function searchId (params) {
  return request({
    url: 'api/labBusyTime/queryLabBusyTimeSelf',
    method: 'get',
    params
  })
}

export function del(ids) {
  return request({
    url: 'api/labBusyTime',
    method: 'delete',
    data: ids
  })
}

export function resolveAppointmentAPI (id) {
  return request({
    url: 'api/labBusyTime/approve?id=' + id,
    method: 'post',
  })
}

export function rejectAppointmentAPI (id, auditNote) {
  return request({
    url: 'api/labBusyTime/reject?id=' + id + '&auditNote=' + auditNote,
    method: 'post',
  })
}
export default { add, edit, del }
